adTempus API
PreviousUpNext
IJob::ExecuteJob Method

Executes the job immediately 

ExecuteJob submits the job for immediate execution using the settings specified in the options passed to the method.

C++
HRESULT ExecuteJob(IJobExecutionOptions * options);
C#
ExecuteJob(IJobExecutionOptions options);
Visual Basic
Sub ExecuteJob(options As IJobExecutionOptions)
Parameters 
Description 
[in] IJobExecutionOptions * options 
Settings that control the execution. 

These options allow you to run only selected steps, set logon session options, set job variables, etc. 

This exposes all the functionality available in the "Execute Job" options dialog in the adTempus Console. 

The Executionoptions.ExecutionRequestID contains a unique value that identifies this execution request. After you call ExecuteJob, the ExecutionRequestID can be used in a call to Scheduler.GetInstancesForRequest to get all of the instances that were started as a result of this request (there may be more than one instance if the job runs on the Master and/or one or more Agents). This allows the client to monitor the instances that it started, and wait for them to complete if appropriate. This is an enhancement over previous versions of the API, which provided no way to determine which instances resulted from an execution request.

You must have saExecute permission for the job, or the method will fail with error ADT_E_NO_PERMISSION. 

If Distributed Scheduling is being used, use IJobAgentJoin.ExecuteJob to run the job on a specific agent.

adTempus API Reference version 3.0.0.0, revised 10/30/2008